//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "ia\fn_stuckUnit2.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_unit","_initial_pos_atl"];
_unit = _this;
if (IS_ARRAY(_unit)) then {
	DEFAULT_PARAM(_unit,0,objNull);
};
if (AND_ALSO(AND_ALSO(IS_OBJECT(_unit),!isNull _unit),(_unit isKindOf "Man"))) then {
	doStop _unit;
	_initial_pos_atl = getPosATL _unit;
	_unit doMove _initial_pos_atl;
	_unit forceSpeed 0;
	DEBUG_1("Starting Watch", ARR_2(_unit, typeof _unit));
	_unit enableAI "MOVE";
} else {
	ERROR("Invalid Unit");
};

TRACE("End");
TMFPROFILERSTOP;